<%@ page import="com.liliya.service.AdService" %>
<%@ page import="com.liliya.service.impl.AdServiceImpl" %>
<%@ page import="com.liliya.pojo.Ad" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/4
  Time: 14:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>更新广告</title>
    <style>

        .blue_text {
            width: 100px;
            background: rgb(112, 144, 183);
        }

        table, tr, td {
            border: 1px solid rgb(112, 144, 183);
            text-align: center;
        }

        td {
            padding: 9px;
        }

        table {
            margin: auto;
            margin-bottom: 50px;
            width: 650px;
        }

        .aaa {
            padding: 10px;
        }

        .main {
            border: 2px solid cornflowerblue;
        }
    </style>
</head>
<body>

<div style="width: 760px">
    <%@ include file="../common/header.jsp" %>
    <div class="main">
        <div style="margin: 10px 20px">
            <img src="../img/adver.gif" alt="广告管理">
        </div>
        <div style="text-align: center;font-size: 22px;color:rgb(112, 144, 183);margin-bottom: 20px">
            更新广告
        </div>
        <form method="post" action="${pageContext.request.contextPath}/ad/update" enctype="multipart/form-data">
            <table cellspacing="0" cellpadding="12">
                <tr>
                    <td class="blue_text">上传新的广告图片</td>
                    <td colspan="3">
                        <img width="350px" src="${pageContext.request.contextPath}${ad.adlink}" alt="">
                        <input type="file" name="adfile">
                    </td>
                </tr>

                <input type="hidden" name="adnum" value="${ad.adnum}">

                <tr>
                    <td class="blue_text">广告名字</td>
                    <td colspan="3"><input name="adname" type="text" style="width: 100%;
    height: 30px;" value="${ad.adname}">
                    </td>
                </tr>
                <tr>
                    <td class="blue_text">ALT信息</td>
                    <td colspan="3"><input name="adalt" type="text" style="width: 100%;
    height: 30px;" value="${ad.adalt}">
                    </td>
                </tr>

                <tr>
                    <td class="blue_text">广告说明</td>
                    <td colspan="3">
                        <input name="adcomment" type="text" style="width: 100%;
    height: 30px;" value="${ad.adcomment}">
                    </td>
                </tr>

                <tr>
                    <td colspan="2">
                        <button style="width: 100px;height: 35px">更新</button>
                    </td>
                </tr>
            </table>
        </form>
    </div>

    <%@ include file="../common/footer.jsp" %>
</div>
</body>
</html>
